#include<stdio.h>
int main()
{
	int x;
	scanf("%d",&x);
	if(x<6)
	printf("%d",x+2);
	else
	printf("%d",x-5);
	return 0;
}
